<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/11/12
  Time: 14:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!doctype html>
<html>
<head>
    <script src="js/jquery-3.2.1.min.js" type="application/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function(){

            $("#adress1").focus(function(){
                var $s1=$(this).val();//val()函数还有一个作用就是用于下拉列表，单选框，多选框的默认选项：$("#id").val(["option.value","option.value"])
                if($s1=="请输入账号"){
                    $(this).val("");
                }
            })
            $("#adress1").blur(function(){
                var $s1=$(this).val();
                if($s1==""){
                    $(this).val("请输入账号");
                }
            })
            $("#adress2").focus(function(){
                var $s1=$(this).val();
                if($s1=="请输入密码"){
                    $(this).val("");
                }
            })
            $("#adress2").blur(function(){
                var $s1=$(this).val();
                if($s1==""){
                    $(this).val("请输入密码");
                }
            })
        })

    </script>
    <meta charset="utf-8">
    <title>用户注册</title>
</head>
<form action="sigin.do" method="post">


        <legend>用户注册</legend>
        <input type="text" value="请输入账号" id="adress1" name="caccount"><br>

        <input type="password" value="请输入密码" id="adress2" name="cpass"><br>

        <input type="submit" value="注册">
        <input type="checkbox" value="记住状态">记住状态<br>

</form>
<body>
</body>
</html>

